package thss.mro.entity;
/**
 * 协议字段实体类
 */
public class TemplateField {

	protected String name;//协议字段名称
	
	protected int length;//协议字段长度，单位根据Template的valueType
	
	protected String description;//协议字段描述
	
	protected int type; //数据类型(对应Constants中的数据类型定义)
	
	protected boolean dynamic = false; //是否动态字段，默认不是
	
	protected DynamicAttrs dynamicAttrs; //动态属性
	
	public boolean isDynamic() {
		return dynamic;
	}

	public void setDynamic(boolean dynamic) {
		this.dynamic = dynamic;
	}

	public TemplateField(){}
	
	public TemplateField(String name,int length,String description,int type){
		this.name = name;
		this.length = length;
		this.description = description;
		this.type = type;
	}
	
	public TemplateField(String name,int length,String description,int type,
			DynamicAttrs dynamicAttrs){
		this.name = name;
		this.length = length;
		this.description = description;
		this.type = type;
		this.dynamic = true;
		this.dynamicAttrs = dynamicAttrs;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		this.length = length;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public DynamicAttrs getDynamicAttrs() {
		return dynamicAttrs;
	}

	public void setDynamicAttrs(DynamicAttrs dynamicAttrs) {
		this.dynamicAttrs = dynamicAttrs;
	}

}
